/**
 * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springblade.modules.bank.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springblade.core.mp.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 客户呼叫记录实体类
 *
 * @author Blade
 * @since 2022-07-08
 */
@Data
@TableName("tm_customer_call_record")
public class TmCustomerCallRecord extends DataAuthEntity{

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableId(value = "id",type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 任务id
     */
	@JsonSerialize(using = ToStringSerializer.class)
    private Long taskId;
    /**
     * 任务编号
     */
    private String taskCode;
    /**
     * 区域
     */
    private String region;
    /**
     * 部门id
     */
    private String deptId;
    /**
     * 部门
     */
    private String deptName;
    /**
     * 客户经理员工号
     */
    private String custMgr;
    /**
     * 客户经理
     */
    private String custMgrName;
    /**
     * 客户编号
     */
    private String customerCode;
    /**
     * 性别（男1、女2）
     */
    private String sex;
    /**
     * 电话号码
     */
    private String phoneNumber;
    /**
     * 呼叫日期
     */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate callDate;
    /**
     * 状态（1呼入 2呼出）
     */
    private String callType;
    /**
     * 响铃时间/拨打时间
     */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime callRingtimeStart;
    /**
     * 响铃结束时间
     */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime callRingtimeEnd;
    /**
     * 0未接通 1接通
     */
    private String communicateType;

    private String communicateTime;
    /**
     * 通话开始时间
     */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime communicateBegintime;
    /**
     * 通话结束时间
     */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime communicateEndtime;
    /**
     * 通话保持开始时间
     */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime keepBegintime;
    /**
     * 通话保持结束时间
     */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime keepEndtime;
    /**
     * 录音文件名
     */
    private String fileName;
    /**
     * 录音文件类型
     */
    private String fileType;
    /**
     * 录音文件大小
     */
    private Long fileSize;
    /**
     * 录音文件路径
     */
    private String filePath;

	/**
	 * 挂断状态 0 正常 1接通，客户不配合 2拒接 3未接
	 */
	@TableField(value = "hangup_status", whereStrategy = FieldStrategy.NOT_EMPTY)
	private String hangupStatus;

	private String status;
    /**
     * 录音上传时间
     */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime uploadTime;
	/**
	 *创建时间
	 */
	@TableField(fill = FieldFill.INSERT,updateStrategy = FieldStrategy.NEVER)
	@JsonIgnore
	private Date createTime;

	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@JsonIgnore
	private Date updateTime;

	/**
	 * 话机版本
	 */
	private String phoneVersion;
}
